﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Internal.Master" Inherits="System.Web.Mvc.ViewPage<BPM.Entity.PurchaseOrder>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    审核进货单
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptStyleContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table>
        <tr>
            <td>
                进货单条码:
            </td>
            <td>
                <%= Model.Barcode.Number %>
            </td>
            <td>
                创建者:
            </td>
            <td>
                <%= Model.Creator.RealName %>
            </td>
            <td>
                创建时间:
            </td>
            <td>
                <%= Model.CreatedTime.ToShortDateString() %>
            </td>
        </tr>
    </table>
    <% if (Model.ItemList != null && Model.ItemList.Count > 0)
       { %>
    <div id="materialContainer">
        <table class="altTable" cellpadding="10">
            <thead>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        物料型号
                    </td>
                    <td>
                        数量
                    </td>
                    <td>
                        价格
                    </td>
                    <td>
                        付款方式
                    </td>
                    <td>
                        交货日期
                    </td>
                </tr>
            </thead>
            <tbody>
                <% foreach (var item in Model.ItemList)
                   { %>
                <tr>
                    <td>
                        <img src="<%= Url.Content(item.MaterialDefinition.ImagePath) %>" />
                    </td>
                    <td>
                        <%= item.MaterialDefinition.Name %>
                    </td>
                    <td>
                        <%= item.Amount %>
                    </td>
                    <td>
                        <%= item.MaterialDefinition.Price %>
                    </td>
                    <td>
                        <%= item.PaymentMode %>
                    </td>
                    <td>
                        <%= item.DeliveryTime.ToShortDateString() %>
                    </td>
                </tr>
                <%} %>
            </tbody>
        </table>
    </div>
    <%}
       else
       { %>
    <p>
        此进货单不包括任何物料!
    </p>
    <%   } %>
    <p>
        <%= Html.ActionLink("同意" , BPM.AD.Singleton.PurchaseOrder.ApprovePendingPurchaseOrder , new{ id = Model.Id}) %>
        <%= Html.ActionLink("删除", BPM.AD.Singleton.PurchaseOrder.DeletePendingPurchaseOrder, new { id = Model.Id })%>
        <%= Html.ActionLink("返回", BPM.AD.Singleton.PurchaseOrder.PendingPurchaseOrderList)%>
    </p>
</asp:Content>
